home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group93c.txt / 000069_icon-group-sender _Fri Oct 8 05:07:26 1993.msg < prev    next >
Internet Message Format  |  1994-02-02  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Fri, 8 Oct 1993 08:17:59 MST
  2. Via: uk.ac.edinburgh.festival; Fri, 8 Oct 1993 13:07:02 +0100
  3. Date: 08 Oct 93 13:06:52 BST
  4. From: R J Hare <rjhare@festival.ed.ac.uk>
  5. Subject: Various questions
  6. To: icon-group@cs.arizona.edu
  7. Reply-To: r.j.hare@edinburgh.ac.uk
  8. Organisation: Edinburgh University Computing Service
  9. Message-Id: <9310081306.aa17911@uk.ac.ed.festival>
  10. Status: R
  11. Errors-To: icon-group-errors@cs.arizona.edu
  12.  
  13. I have three questions:
  14.  
  15. 1) What is the 'best' (ie: most random) way to seed the random number
  16.    generator in a particular situation. Currently, I do something like:
  17.  
  18.    &random:=&date[6:8]||&date[9:11]||&clock[1:3]||&clock[4:6]||&clock[7:9]
  19.  
  20.    which produces a 10 digit number as a seed. Would I be 'better' using just
  21.    the six digits obtained from &clock?
  22.  
  23. 2) The above syntax is tedious. Is there a better way (I am sure there is)? In
  24.    particular, can I say:
  25.  
  26.    &random:=&date[6:8||9:11]||&clock[1:3||4:6||7:9]
  27.  
  28.    where the ||s represent some way of concatenating substrings of a value
  29.    whilst referring to that value only once.
  30.  
  31. 3) If I have a list which is (say) 10 elements long, what happens if I assign
  32.    a value to list[12]? Is an empty (null) list[11] created? I have tried
  33.    this, and the assignment appears to fail and the list length is unchanged,
  34.    so what is happening 'behind the scenes'?
  35.  
  36. I wouldn't ask these daft questions but I and my Icon book are several miles
  37. away from each other and are unlikely to rejoin eachother for several days.
  38.  
  39. Thanks.
  40.  
  41. Roger Hare.
  42.